package com.dragon.common.model;

public enum ResultCode {
    /* 成功状态码 */
    SUCCESS(200, "成功"),
    ERROR(400,"失败"),
    /* 参数错误 */

    PARAM_IS_INVALID(1001, "参数无效"),
    PARAM_IS_BLANK(1002, "参数为空"),
    LONGIN_ERROR(1003,"请先登录"),
    LOGOUT_SUCCESS(1004,"退出成功"),
    TOKEN_EXPIRESS_ERROR(1005,"token已过期"),
    TOKEN_ERROR(1006,"token异常"),
    TOKEN_NOT_FOUND(1007,"未检测到token值"),
    ACCESS_NO_PERMISSION(1008,"访问资源无权限"),
    AUTH_ERROR(1009,"token认证失败"),

    DATA_NOT_FOUND(1010,"数据不存在"),
    DATA_ALREADY_EXISTS(1011,"名称已存在"),
    AUTH_ADD_SIGN_NOT_ALLOW(1011,"不允许加签"),

    DATE_APPLICATION_IS_EXISTS(1012,"请勿重复提交申请修改数据"),

    TOKEN_IS_LOGIN_ERROR(1012,"该账号已在其他地方登录，请重新登录或者修改密码"),

    ROLE_DATA_IS_EXIT_ADMIN(1012,"该角色与用户存在关联，请删除对应用户数据"),
    ROLE_DATA_IS_EXIT_DEPARTMENT(1013,"该角色与部门存在关联，请删除对应部门数据"),
    ROLE_DATA_IS_EXIT_MENU(1014,"该角色与菜单存在关联，请删除对应菜单数据"),
    ROLE_DEPARTMENT_IS_RELEVANCY(1015,"该角色与部门存在关联，请删除对应部门数据"),
    ADMIN_RELEVANCY(1016,"存在关联，请删除对应数据"),

    POSITION_MANAGEMENT_STATE_ALREADY(1017,"岗位直接主管只有一个"),

    IS_EXIST(1021,"该数据在数据中已有数据"),

    /*仓库错误 1900-2000*/
    WAREHOUSE_IS_INVENTORY(1901,"该仓库正在盘点"),
    WAREHOUSE_IS_NOT_EXIST(1902,"该仓库不存在"),

    /* 用户错误 2001-2999*/
    USER_INFO_NOT_FOUND(2001,"账号不存在"),
    USER_INFO_NOT_PASSWORD(2002,"请输入用户密码"),
    USER_INFO_NOT_PASSWORD_ERROR(2003,"密码错误"),
    CLIENT_USER_INFO_NOT_FOUND(2004,"账号或者手机号不存在"),
    USER_FAILED_TO_ADD(2005,"添加用户信息失败"),
    USER_INFO_NOT_PASSWORD_NULL(2006,"密码不能为空"),
    USER_TWO_PASSWORD_NOT_SOME(2007,"两次密码不一致"),
    USER_OLD_PASSWORD_NOT_SAME(2008,"当前旧密码输入错误"),

    PHONE_REPEAT(2009,"手机号码已存在"),

    ACCOUNT_REPEAT(2010,"账号已存在"),
    ACCOUNT_IS_NOT_REPEAT(2011,"账号不存在"),

    USER_DEPARTMENT_IS_EXIT(2009,"该部门已关联用户数据无法删除"),


    /* 角色错误  暂定2020 */
    Role_Duplication(2020,"角色重复添加"),

    /* 删除错误 */
    IS_DELETE(2021,"已删除"),
    DELETE_NOT_AUDIT(2022,"已删除的不能审核"),
    PROJECT_IS_PASS(2023,"项目通过，不能删除"),
    NOT_DELETE_A_CONDITION(2024,"未达到删除条件"),
    REIMBURSEMENT_STATUS_THREE(2025,"审核中无法删除"),


    /* 客户错误 2030-2040*/
    CUSTOMER_NAME_OR_PHONE_NULL(2030,"客户名称或者手机号为空"),
    CUSTOMER_NAME_IS_SAME(2031,"客户名称已存在"),
    CUSTOMER_DATA_NOT_FOUND(2032,"客户数据不存在"),

    /*项目错误2041-2050*/
    PROJECT_NAME_IS_NULL(2041,"项目名称为空"),
    DUPLICATE_SUBMISSIONS(2042,"重复提交"),
    PROJECT_NOT_UNDER_CURRENT_CUSTOMER(2043,"所选项目不在当前客户中"),
    END_TIME_NOT_NULL(2044,"截至时间不能为空"),
    PROJECT_DATA_NOT_FOUND(2045,"客户数据不存在"),


    /*合同错误*/
    CONTRACT_NAME_IS_NULL(2051,"合同名称为空"),
    CONTRACT_MONEY_NULL(2052,"合同金额为空"),
    CONTRACT_DATA_NOT_FOUND(2053,"合同数据不存在"),
    CONTRACT_IS_UNABLE_SUPPLEMENT(2054,"合同未审核，无法补充"),
    QUOTES_IS_RELEVANCY_CONTRACT(2060,"该报价关联合同"),


    REFUND_PRODUCT_IS_NOT_FUND(2061,"退款产品列表不存在"),

    REFUND_PRODUCT_NUE_MAX(2062,"退款产品数量已经超过发货数量"),


    PAYMENT_MONEY_IS_INSUFFICIENT(2063,"本次付款金额超出"),


    /* 角色错误  暂定2060 */
    //Role_Duplication(2060,"角色重复添加"),
    NOT_ENOUGH_TIME(2066,"提醒时间不够"),
    ONLY_UPDATE_NOW_DAY_DAILY(2067,"只能修改当天日报"),
    NOT_REPEAT_CLOCK(2068,"请勿重复打卡"),
    NO_CLOCK_OUT_ON_DAYS_OFF(2069,"休息日不打卡"),
    NOT_IN_SCOPE(2070,"不在范围内"),

    YOU_NOT_HAVE_ARRANGE(2071,"您暂时没有考勤配置"),
    ATTENDANCE_CONFIG_IS_NOT_FOUND(2072,"您未配置打卡规则"),

    ATTENDANCE_ADMIN_IS_EXIT(2073,"选择的人员中已存在考勤配置，请重新配置"),

    ATTENDANCE_IS_NOT_WORK_DAY(2074,"今天是休息日，无需打卡"),
    ATTENDANCE_LEAVE_REPEAT_CREATE(2075,"请假日期重复"),

    /*群组错误 3001-3999*/
    LOG_AOP_ANNOTATION(3001,"日志注解必须传入参数"),
    SEND_MESSAGE_ERROR(3002,"消息发送失败"),

    /* 报价错误 3100-3200 */
    QUOTES_DATA_NOT_FOUND(3101,"报价数据不存在"),
    QUOTES_DISCOUNTMONEY_IS_NOT_BIG_TOTELMONEY(3102,"优惠金额不能大于报价总金额"),

    /*会话错误 4001-4999*/
    USER_SEESION_NOT_FOUND(4001,"用户会话不存在"),

    USER_PUSH_TIME_ERROE(4002,"距离下次推送时间还未到"),

    CUSTOMER_ACCOUNT_PROPS_NOT_FOUND(4003,"客服管理员无客服账号"),


    /*快捷回复错误5001-5999*/
    USER_SHORTCUT_NOT_FOUND(5001,"快捷方式不存在"),


    /*快捷回复错误6001-6999*/
    USER_RECEPTION_NOT_FOUND(6001,"客服配置不存在"),


    PLAN_COLLECT_MONEY_MAX(7001,"单笔回款超出剩余回款"),
    EXCEED_PLAN_MONEY(7002,"超出计划收款金额"),


    POSITION_IS_EXIT(8001,"该岗位只能存在一位直接主管，请重新设置"),

    /*对账单错误 9001*/
    BILL_IS_NOT_DATA_UPDATE(9001,"该客户的对账单已是最新"),
    TIME_BILL_IS_TRUE(9002,"当前时间段已创建对账单"),
    NO_DATA_NO_BUILD(9003,"没有数据无需生成账单"),

    NUMBER_IS_MAXIMUM(50000, "轮次编号达到最大"),
    PRODUCE_IS_EXIST(50001, "该合同已生产，无法反审核"),
    PRODUCE_IS_NOT_MODIFY(50001, "该合同已生产，无法提交修改申请"),

    SCHEDULING_OUT_NUM_INADEQUATE(50002, "外发数量不足"),
    DELIVER_NUM_INADEQUATE(50003, "发货数量超过合同数量"),
    REJECTED_NUM_INADEQUATE(50004, "发货数量超过退货数量"),

    DELIVER_IS_AUDIT(50005,"该送货单已经确认收货，请勿重复收货"),

    /*计量单位*/
    PRODUCT_UNIT_IS_ENABLE(40001,"计量单位已启用，不能删除"),
    EXPENSES_IS_RELEVANCY(40002,"单据类型已有关联数据，不能禁用"),

    ARTICLE_HAVE_IS_DEFAULT(40003,"已有默认条款"),
    DEFAULT_ARTICLE_NOT_DELETE(40004,"默认条款无法删除"),
    ARTICLE_IS_RELEVANCY_CONTRACT(40005,"该条款已关联合同，无法删除"),
    EQUIPMENT_CODE_IS_REPEAT(40006,"该编号设备重复添加"),

    AUDIT_MONEY_IS_DATA(40007,"已有在审金额"),
    EQUIPMENT_IS_WORK(40008,"改设备正在工作，无法修改"),

    SCHEDULING_NUM_GREATER_THAN_PRODUCE_NUM(50001,"排产数量超过生产单产品剩余数量"),

    WECHAT_ADD_ARTICLE_ERROR(60001,"微信文章添加失败"),
    WECHAT_UPDATE_ARTICLE_ERROR(60002,"微信文章修改失败"),
    WECHAT_DELETE_ARTICLE_ERROR(60003,"微信文章删除失败"),

    WECHAT_SUMMIT_ARTICLE_ERROR(60004,"文章发布失败"),

    WECHAT_GET_STATUS_ERROR(60005,"状态拉取失败"),


    WECHAT_MENU_CREATE_ERROR(70001,"微信菜单添加失败"),
    WECHAT_ONE_LEVEL_IS_TO_MANY(70002,"微信菜单一级超出最大个数"),
    WECHAT_TWO_LEVEL_IS_TO_MANY(70003,"微信菜单二级超出最大个数"),
    WECHAT_MENU_SELECT_ERROR(70004,"微信菜单查询失败"),
    WECHAT_MENU_NAME_IS_EXIT(70005,"微信菜单名称已存在"),

    REJECTED_IS_AUDIT(80001,"此退货已审核"),
    REJECTED_NUM_EXCEED_DELIVER_NUM(80002,"退货数量超过送货数量"),


    FINANCE_BILL_IS_NOT_FOUND(90001,"选择的日期，已经生成过账单数据，请勿重复生成"),


    SYSTEM_ERROR(10000, "系统异常，请稍后重试");

    private Integer code;
    private String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
        //cehsi a
    }
    public Integer code() {
        return this.code;
    }
    public String message() {
        return this.message;
    }
}
